﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using System.Windows.Forms;

namespace WinFormTest
{
	public partial class UrlEncode : Form
	{
		public UrlEncode()
		{
			InitializeComponent();
		}

		private void button1_Click(object sender, EventArgs e)
		{
			string baseurl = "http://www.17u.cn/cooperation.aspx?redirectUrl={0}&callbackData={1}&nickname={2}";
			string redirectUrl = HttpUtility.UrlEncode(textBox1.Text);
			string callbckdate = HttpUtility.UrlEncode(textBox2.Text);
			string nickname = HttpUtility.UrlEncode(textBox3.Text);
			string result = string.Format(baseurl, redirectUrl, callbckdate, nickname);
			textBox4.Text = result;
		}
	}
}
